#ifndef __keyboard_event_h
#define __keyboard_event_h

#include "types.h"

enum class VirtualKeycode : u8 {
    INVALID = 0,
    A = 1,
    B = 2,
    C,
    D,
    E,
    F,
    G,
    H,
    I,
    J,
    K,
    L,
    M,
    N,
    O,
    P,
    Q,
    R,
    S,
    T,
    U,
    V,
    W,
    X,
    Y,
    Z,
    OPEN_SQUARE,
    CLOSE_SQUARE,
    BACKSLASH,
    CAPS_LOCK,
    ESCAPE,
    F1,
    F2,
    F3,
    F4,
    F5,
    F6,
    F7,
    F8,
    F9,
    F10,
    F11,
    F12,
    PRINT_SCREEN,
    SCROLL_LOCK,
    PAUSE,
    SPACE,
    BACKSPACE,
    TAB,
    ENTER,
    LSHIFT,
    RSHIFT,
    LCTRL,
    RCTRL,
    LALT,
    RALT,
    N_SLASH,
    N_MINUS,
    N_DOT,
    U_ARROW,
    L_ARROW,
    D_ARROW,
    R_ARROW,
    INSERT,
    DELETE,
    HOME,
    END,
    PAGE_UP,
    PAGE_DOWN,
    COLON,
    SLASH,
    DOT,
    COMMA,
    QUOTE,
    TILDE,
    T_0,
    T_1,
    T_2,
    T_3,
    T_4,
    T_5,
    T_6,
    T_7,
    T_8,
    T_9,
    T_10,
    T_11,
    N_0,
    N_1,
    N_2,
    N_3,
    N_4,
    N_5,
    N_6,
    N_7,
    N_8,
    N_9,
    N_ENTER,
    NUM_LOCK,
};

//a single event in the world of virtual keys.
//the status register is as follows:
// [0-4: UNUSED | 5: ctrl | 6: shift | 7: pressed]
// make: 1 if the key is pressed, 0 if the key is released
typedef struct __attribute__ ((__packed__))  VirtualKeyEvent {
    VirtualKeycode vkey;
    u8 status;
} VirtualKeyEvent;

#endif